
public class Pokemon {
	String name;
	int attack;
	int defence;
	int life;
	
	public Pokemon(String name, int attack, int defence, int life){
		this.name = name;
		this.attack = attack;
		this.defence = defence;
		this.life = life;
	}
	
	public boolean isAlive(){
		if(this.life > 0){
			return true;
		}else{
			return false;
		}
	}
	
	public void defend(int attack){
		int effect = attack * ((100 - this.defence)/100.0);		
		this.life = this.life - (int)effect;		
	}
	
	public String ToString(){
		String str = "name: " + name + "\n"
				+ "attack: " + attack + "\n"
				+ "defence: " + defence + "\n"
				+ "life: " + life + "\n"
				+ "is alive: " + isAlive();
		return str;
	}
}